﻿//	Plazes-ASPI is an AS2.0 abstraction of the Plazes (http://www.plazes.com) XMLRPC-API
//		Copyright (C) 2006	Florian Mlodzik
//
//		This library is free software; you can redistribute it and/or
//		modify it under the terms of the GNU Lesser General Public
//		License as published by the Free Software Foundation; either
//		version 2.1 of the License, or (at your option) any later version.
//
//		This library is distributed in the hope that it will be useful,
//		but WITHOUT ANY WARRANTY; without even the implied warranty of
//		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the GNU
//		Lesser General Public License for more details.
//
//		You should have received a copy of the GNU Lesser General Public
//		License along with this library; if not, write to the Free Software
//		Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

// svn:keywords
// $URL: http://plazes-aspi.googlecode.com/svn/trunk/src/as2/com/orthogeneric/webapis/plazes/events/PlazesResult.as $
// $Id: PlazesResult.as 5 2006-08-07 19:54:11Z florian.mlodzik $

/**
* A PlazesResult will be dispatched by a PlazesService-instance when the remote procedure returned a valid result.
* 
* @author florian.mlodzik@gmail.com
* @version 1.0
*/

// import -->
import com.orthogeneric.net.xmlrpc.events.XmlRpcResult;
import com.orthogeneric.webapis.plazes.methods.MethodsBase;
import com.orthogeneric.webapis.plazes.PlazesService;
// <-- import

class com.orthogeneric.webapis.plazes.events.PlazesResult
{
	/** The type of this event, always being "onPlazesResult" */
	public var type:String = "onPlazesResult";
	/** The target of this event referencing a {@code PlazesService}-instance */
	public var target:PlazesService;
	/** The group of the called method, i.e. "api" */
	public var methodGroup:String;
	/** The method called locally, i.e. "getVersion" */
	public var localMethod:String;
	/** The remote method called, i.e. "api.version" */
	public var remoteMethod:String;
	/** The result received serialized to Actionscript types */
	public var result:Object;
	
	/**
	* The PlazesResult-class constructor.
	* 
	* @param	t The MethodBase-instance that invoked the remote procedure call
	* @param	lMethod The name of the local method that was called
	* @param	x The XmlRpcResult-event received from the {@link com.orthogeneric.net.xmlrpc.XmlRpc}-instance
	* 
	* @see com.orthogeneric.net.xmlrpc.events.XmlRpcResult
	* 
	* @exclude
	*/
	public function PlazesResult(t:PlazesService, xEvt:XmlRpcResult, lMethod:String, methGroup:String)
	{
		target = t;
		methodGroup = methGroup;
		localMethod = lMethod;
		remoteMethod = xEvt.remoteMethod;
		result = xEvt.result;
	}
}
